package com.daoeping.data;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Cop_companyinfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cop_companyinfo", catalog = "daoeping")
public class Cop_companyinfo implements java.io.Serializable {

	// Fields

	private Integer id;
	private Bsc_nature bsc_nature;
	private String name;
	private String shortName;
	private String description;
	private Integer scaleId;
	private Integer isValidated;
	private Set<Cop_contactref> cop_contactrefs = new HashSet<Cop_contactref>(0);
	private Set<Bsc_contact> bsc_contacts = new HashSet<Bsc_contact>(0);
	private Set<Cop_companyuser> cop_companyusers = new HashSet<Cop_companyuser>(
			0);
	private Set<Usr_workexperience> usr_workexperiences = new HashSet<Usr_workexperience>(
			0);
	private Set<Bzn_jobdescription> bzn_jobdescriptions = new HashSet<Bzn_jobdescription>(
			0);

	// Constructors

	/** default constructor */
	public Cop_companyinfo() {
	}

	/** minimal constructor */
	public Cop_companyinfo(String name) {
		this.name = name;
	}

	/** full constructor */
	public Cop_companyinfo(Bsc_nature bsc_nature, String name,
			String shortName, String description, Integer scaleId,
			Integer isValidated, Set<Cop_contactref> cop_contactrefs,
			Set<Bsc_contact> bsc_contacts,
			Set<Cop_companyuser> cop_companyusers,
			Set<Usr_workexperience> usr_workexperiences,
			Set<Bzn_jobdescription> bzn_jobdescriptions) {
		this.bsc_nature = bsc_nature;
		this.name = name;
		this.shortName = shortName;
		this.description = description;
		this.scaleId = scaleId;
		this.isValidated = isValidated;
		this.cop_contactrefs = cop_contactrefs;
		this.bsc_contacts = bsc_contacts;
		this.cop_companyusers = cop_companyusers;
		this.usr_workexperiences = usr_workexperiences;
		this.bzn_jobdescriptions = bzn_jobdescriptions;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nature_id")
	public Bsc_nature getBsc_nature() {
		return this.bsc_nature;
	}

	public void setBsc_nature(Bsc_nature bsc_nature) {
		this.bsc_nature = bsc_nature;
	}

	@Column(name = "name", nullable = false, length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "short_name", length = 50)
	public String getShortName() {
		return this.shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	@Column(name = "description", length = 4000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "scale_id")
	public Integer getScaleId() {
		return this.scaleId;
	}

	public void setScaleId(Integer scaleId) {
		this.scaleId = scaleId;
	}

	@Column(name = "is_validated")
	public Integer getIsValidated() {
		return this.isValidated;
	}

	public void setIsValidated(Integer isValidated) {
		this.isValidated = isValidated;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cop_companyinfo")
	public Set<Cop_contactref> getCop_contactrefs() {
		return this.cop_contactrefs;
	}

	public void setCop_contactrefs(Set<Cop_contactref> cop_contactrefs) {
		this.cop_contactrefs = cop_contactrefs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cop_companyinfo")
	public Set<Bsc_contact> getBsc_contacts() {
		return this.bsc_contacts;
	}

	public void setBsc_contacts(Set<Bsc_contact> bsc_contacts) {
		this.bsc_contacts = bsc_contacts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cop_companyinfo")
	public Set<Cop_companyuser> getCop_companyusers() {
		return this.cop_companyusers;
	}

	public void setCop_companyusers(Set<Cop_companyuser> cop_companyusers) {
		this.cop_companyusers = cop_companyusers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cop_companyinfo")
	public Set<Usr_workexperience> getUsr_workexperiences() {
		return this.usr_workexperiences;
	}

	public void setUsr_workexperiences(
			Set<Usr_workexperience> usr_workexperiences) {
		this.usr_workexperiences = usr_workexperiences;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cop_companyinfo")
	public Set<Bzn_jobdescription> getBzn_jobdescriptions() {
		return this.bzn_jobdescriptions;
	}

	public void setBzn_jobdescriptions(
			Set<Bzn_jobdescription> bzn_jobdescriptions) {
		this.bzn_jobdescriptions = bzn_jobdescriptions;
	}

}